<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    请输入QQ号：
    <input type="text" id="t">
    <button id="b">点击登录</button>
    <script>
        var t = document.getElementById('t')
        var b = document.getElementById('b')
        b.onclick = function () {
            if (isNaN(t.value) == true) {
                alert('请输入数字')
            } else if (t.value.length == 0) {
                alert('qq号呢？？')
            } else if (t.value != parseInt(t.value)) {
                alert('请输入整数')
            } else if (t.value[0] == 0) {
                alert('首位不能为0')
            } else if (t.value.length < 5) {
                alert('请输入5-10位的正确QQ号')
            } else if (t.value.length > 10) {
                alert('请输入5-10位的正确QQ号')
            } else {
                alert('登录成功')
            }
        }
    </script>
</body>

</html>